<?php
session_start();

if (!isset($_SESSION['username'])) {
	header("Location: login.php");
	die();
} else {
?>
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Question Answering System (QAS) Al Qur'an Bahasa Indonesia">
    <meta name="author" content="Hasan Sulthoni">

    <title>Question Answering System (QAS) Al Qur'an Bahasa Indonesia</title>

    <!-- Bootstrap Core CSS -->
    <link href="assets/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="assets/css/sb-admin.css" rel="stylesheet">

    <!-- Morris Charts CSS -->
    <link href="assets/css/plugins/morris.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="assets/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <style type="text/css">
        .my-content {
            margin-left: 15px;
        }

        @font-face {
            font-family: myFirstFont;
            /*src: url(fonts/UthmanicHafs1 Ver09.otf);*/
            /*src: url(fonts/PDMS_Saleem_QuranFont-signed.ttf);*/
            src: url(assets/fonts/Scheherazade-R.ttf);
        }
        
        table th.head-table {
            text-align: center;
            text-valign: center;
        }
        
        table td.arabic {
            font-family: myFirstFont;
            text-align: right;
            font-size: 26px;
            letter-spacing: 1px;
            word-spacing: 3px;
            line-height:50px;
        }
        table td.indonesia {
            text-align: left;
            line-height:50px;
            text-valign: center;
        }
        
        table td .arabic {
            font-family: myFirstFont;
            text-align: right;
            font-size: 26px;
            letter-spacing: 1px;
            word-spacing: 3px;
            line-height:50px;
        }
        table td .indonesia {
            text-align: left;
            line-height:50px;
            text-valign: center;
        }
    </style>

</head>

<body>

    <div id="wrapper">

        <!-- Navigation -->
        <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="?action=home">Question Answering System (QAS) Al Qur'an Bahasa Indonesia</a>
            </div>
            <!-- Top Menu Items -->
            <ul class="nav navbar-right top-nav">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> <?php echo $_SESSION['username'] ?></b></a>
                </li>
                <li class="dropdown">
                    <a href="?action=logout" class="dropdown-toggle"><i class="fa fa-sign-out"></i> Log Out</b></a>
                </li>
            </ul>
            <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
            <div class="collapse navbar-collapse navbar-ex1-collapse">
                <ul class="nav navbar-nav side-nav">
                    <li>
                        <a href="?action=qas-satu"><i class="fa fa-fw fa-file"></i> QAS Aturan 1</a>
                    </li>
                    <li>
                        <a href="?action=qas-dua"><i class="fa fa-fw fa-file"></i> QAS Aturan 2</a>
                    </li>
                    <li>
                        <a href="?action=qas-tiga"><i class="fa fa-fw fa-file"></i> QAS Aturan 3</a>
                    </li>
                    <!-- <li>
                        <a href="?action=panduan"><i class="fa fa-fw fa-file"></i> Panduan</a>
                    </li> -->
                </ul>
            </div>
            <!-- /.navbar-collapse -->
        </nav>

        <div id="page-wrapper" style="min-height: 500px;">
            <?php include __DIR__ . "/contents.php"; ?>

            <!-- <div class="container-fluid"> -->

                <!-- Page Heading -->
                <!-- <div class="row">
                    <div class="col-lg-12">
                        <h1 class="page-header">
                            Dashboard <small>Statistics Overview</small>
                        </h1>
                        <ol class="breadcrumb">
                            <li class="active">
                                <i class="fa fa-dashboard"></i> Dashboard
                            </li>
                        </ol>
                    </div>
                </div> -->
                <!-- /.row -->
                
                <!-- <div class="row">
                	<a href="?action=logout"><i class="fa fa-sign-out"></i> Log Out</b></a>
                </div> -->
                <!-- /.row -->

            <!-- </div> -->
            <!-- /.container-fluid -->

        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="assets/js/jquery.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="assets/js/bootstrap.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <script src="assets/js/plugins/morris/raphael.min.js"></script>
    <script src="assets/js/plugins/morris/morris.min.js"></script>
    <script src="assets/js/plugins/morris/morris-data.js"></script>

    <script type="text/JavaScript">
    $('#sembunyikan-score').hide();
    $('.score-detail').hide();
    $('#tampilkan-score').click(function() {
        $('#tampilkan-score').hide();
        $('#sembunyikan-score').show();
        $('.score-detail').show();
    });
    $('#sembunyikan-score').click(function() {
        $('#tampilkan-score').show();
        $('#sembunyikan-score').hide();
        $('.score-detail').hide();
    });
    $('.carousel').carousel({
      interval: 3500
    })
    </script>

</body>

</html>
<?php
}
// if (isset($_GET['action'])) {
// 	$action = $_GET['action'];
// 	switch ($action) {
// 		case 'logout':
// 			session_unset();
// 	    	session_destroy();
// 	    	session_write_close();
// 	    	// http_redirect("login.php", array("name" => "value"), true, HTTP_REDIRECT_PERM);
// 	    	header("Location: login.php");
// 			die();
// 			break;
// 		case 'qas-satu':
// 			include __DIR__.'/qas-satu.php';
// 			break;
// 		case 'qas-dua':
// 			include __DIR__.'/qas-dua.php';
// 			break;
// 		case 'qas-tiga':
// 			include __DIR__.'/qas-tiga.php';
// 			break;
// 		case 'panduan':
// 			include __DIR__.'/panduan.php';
// 			break;

// 		default:
// 			include __DIR__.'/panduan.php';
// 			break;
// 	}
// }